how to load data from multiple tables in c